package com.phiture.erp.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * @author YH
 * @date 2025/4/3
 * 物料采购状态
 */

@Getter
@AllArgsConstructor
public enum ErpMaterialPurchasingStatusEnum {
    UNAPPROVED(0, "未核准"),
    APPROVAL(1, "核准"),
    DISABLE(2, "禁用"),
    DELETED(3, "已删除");

    private final Integer status;
    private final String desc;

    public static final Map<Integer, String> MATERIAL_PURCHASING_STATUS_MAP = new HashMap<>(2);
    static {
        for (ErpMaterialPurchasingStatusEnum statusEnum : ErpMaterialPurchasingStatusEnum.values()) {
            MATERIAL_PURCHASING_STATUS_MAP.put(statusEnum.status, statusEnum.desc);
        }
    }

    public static String convert(Integer status){
        return MATERIAL_PURCHASING_STATUS_MAP.get(status);
    }
}
